package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbLogType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_LOG_TYPE", schema = "dbo", catalog = "AGDB")
public class TbLogType implements java.io.Serializable {

	// Fields

	private String ltId;
	private String ltName;
	private String ltColor;
	private Set<TbPsContent> tbPsContents = new HashSet<TbPsContent>(0);
	private Set<TbLogPsContent> tbLogPsContents = new HashSet<TbLogPsContent>(0);
	private Set<TbLog> tbLogs = new HashSet<TbLog>(0);

	// Constructors

	/** default constructor */
	public TbLogType() {
	}

	/** minimal constructor */
	public TbLogType(String ltId) {
		this.ltId = ltId;
	}

	/** full constructor */
	public TbLogType(String ltId, String ltName, String ltColor,
			Set<TbPsContent> tbPsContents, Set<TbLogPsContent> tbLogPsContents,
			Set<TbLog> tbLogs) {
		this.ltId = ltId;
		this.ltName = ltName;
		this.ltColor = ltColor;
		this.tbPsContents = tbPsContents;
		this.tbLogPsContents = tbLogPsContents;
		this.tbLogs = tbLogs;
	}

	// Property accessors
	@Id
	@Column(name = "LT_ID", unique = true, nullable = false, length = 4)
	public String getLtId() {
		return this.ltId;
	}

	public void setLtId(String ltId) {
		this.ltId = ltId;
	}

	@Column(name = "LT_NAME", length = 20)
	public String getLtName() {
		return this.ltName;
	}

	public void setLtName(String ltName) {
		this.ltName = ltName;
	}

	@Column(name = "LT_COLOR", length = 20)
	public String getLtColor() {
		return this.ltColor;
	}

	public void setLtColor(String ltColor) {
		this.ltColor = ltColor;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLogType")
	public Set<TbPsContent> getTbPsContents() {
		return this.tbPsContents;
	}

	public void setTbPsContents(Set<TbPsContent> tbPsContents) {
		this.tbPsContents = tbPsContents;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLogType")
	public Set<TbLogPsContent> getTbLogPsContents() {
		return this.tbLogPsContents;
	}

	public void setTbLogPsContents(Set<TbLogPsContent> tbLogPsContents) {
		this.tbLogPsContents = tbLogPsContents;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLogType")
	public Set<TbLog> getTbLogs() {
		return this.tbLogs;
	}

	public void setTbLogs(Set<TbLog> tbLogs) {
		this.tbLogs = tbLogs;
	}

}